function CGame() {
    var _pStartPosAudio;
    var _pStartPosPlay;
    var _pStartPosInfo;
    var _oBg;
    var _oFBg;
    var _oButPlay;
    var _oButInfo;
    var _oFade;
    var _oAudioToggle;
    var _oContainerStack;
    var _oLeft;
    var _oRight;

    var _oBlackboard;
    var _btnpre;
    var _btnnxt;
    var _btnsetting;
    var _btnshengyin;

    var _text;
    var _title;
    var _oPointer;
    var _d;
    this._init = function () {
        _oContainerStack = new createjs.Container();
        s_oStage.addChild(_oContainerStack);

        // _oFBg = createBitmap(s_oSpriteLibrary.getResult('bg'));
        // _oContainerStack.addChild(_oFBg);
        _oLeft = createBitmap(s_oSpriteLibrary.getResult('zhu'));
        _oContainerStack.addChild(_oLeft);
        _oLeft.x = 144 + 350/2;
        _oLeft.y = 70;

        _oRight = createBitmap(s_oSpriteLibrary.getResult('zhu'));
        _oContainerStack.addChild(_oRight);
        _oRight.x = 514 + 350/2;
        _oRight.y = 70;

        s_oLeftBottom = new CFlip(155, 390, "辣椒", "là jiāo", s_oSpriteLibrary.getResult('leftbottom'), s_oSpriteLibrary.getResult('lajiao'), _oContainerStack, 350);
        s_oRightBottom = new CFlip(525, 390, "石榴", "shí liu", s_oSpriteLibrary.getResult('rightbottom'), s_oSpriteLibrary.getResult('shiliu'), _oContainerStack, 350);

        s_oLeftTop = new CFlip(155, 80, "禾苗", "hé miáo", s_oSpriteLibrary.getResult('lefttop'), s_oSpriteLibrary.getResult('hemiao'), _oContainerStack, 350);
        s_oRigthTop = new CFlip(525, 80, "葡萄", "pú tao", s_oSpriteLibrary.getResult('righttop'), s_oSpriteLibrary.getResult('putao'), _oContainerStack, 350);

        _oBlackboard = createBitmap(s_oSpriteLibrary.getResult('blackboard'));
        _oContainerStack.addChild(_oBlackboard);
    };


    this.unload = function () {
        _oButPlay.unload();
        _oButPlay = null;

        _oButInfo.unload();
        _oButInfo = null;

        if (DISABLE_SOUND_MOBILE === false || s_bMobile === false) {
            _oAudioToggle.unload();
            _oAudioToggle = null;
        }

        s_oStage.removeAllChildren();

        s_oGame = null;
    };

    this.fadeAnim = function () {
        var oParent = this;
        _oFade.visible = true;
        createjs.Tween.get(_oFade, {override: true}).to({alpha: 1}, MS_FADE_ANIM, createjs.Ease.cubicIn).call(function () {
            oParent.unload();
            s_oMain.gotoGame();
        });
    };

    this.changeText = function(txt, title) {
        createjs.Tween.get(_text.getSelf(),{loop:false},true)
            .to({alpha:0},1000,createjs.Ease.linear)
            .call(function () {
                _text.setText(txt);
                createjs.Tween.get(_text.getSelf(),{loop:false},true)
                    .to({alpha:1},1000,createjs.Ease.linear)
            });

        createjs.Tween.get(_title.getSelf(),{loop:false},true)
            .to({alpha:0},1000,createjs.Ease.linear)
            .call(function () {
                _title.setText(title);
                createjs.Tween.get(_title.getSelf(),{loop:false},true)
                    .to({alpha:1},1000,createjs.Ease.linear)
            });
    };

    s_oGame = this;
    this._init();
}

var s_oGame = null;